

{template 'common/header'}
<div class='container' style='padding:0 5px 10px;margin:0;width:100%'>

<div class="panel panel-success">
  <div class="panel-heading">常用工具 > 数据列表</div>
  
</div>

	<form id="user_form" class="form-horizontal" method="post">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
				<th style="width:45px;">全选</th>
					<th style="width:50px;">ID</th>		
					<th style="width:100px;">头像</th>	
          			<th style="width:100px;">昵称</th>
          			<th style="width:100px;">手机号</th>
          			<th style="width:100px;">单位名称</th>
          			<th style="width:60px;">分数</th>
					<th style="min-width:60px;width:70px;">删除</th>
				</tr>
			</thead>
			<tbody>
				{loop $uinfo $item}
				<td><input type="checkbox" value="{$item['id']}" name="delete[]"></td>
					<td>{$item['id']}</td>
					<td><img src="{$item['headimgurl']}" style="width:30px;"></td>
					<td>{$item['nickname']}</td>
					<td>{$item['phone']}</td>
					<td>{$item['company']}</td>
					<td>{$item['score']}</td>
					<td>
					<a onclick="if(confirm('此操作不可恢复，确认吗？')){location.href='{php echo $this->createWebUrl('userinfo', array('id' => $item['id'],'op'=>'del'))}'}" href="javascript:;" title="删除" class="btn btn-xs btn-danger"><span class="icon icon-close">删除</span></a>
					</td>				
				</tr>
				
				{/loop}
				<tr >
				<td><input type="checkbox"  onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});" name=''>    <input class="btn btn-primary btn-xs" type="submit" value="删除" name="submit" ></td><td></td><td></td><td></td>
				</tr>
			</tbody>
		</table>
		<input type="hidden" value="userinfo" name="do">
		<input type="hidden" value="del" name="op">
		<input type="hidden" name="token" value="{$_W['token']}" />
	</form>
	{$pager}
	
	<script>
		$('#user_form').submit(function(){
			if($(":checkbox[name='delete[]']:checked").size() > 0){
				return confirm('删除后不可恢复，您确定删除吗？');
			}
			return false;
		}); 
	</script>
	
{template 'common/footer'}
